import axios from 'axios'

const api = axios.create({
	baseURL: import.meta.env.VITE_API_URL,
	timeout: 10000
})

api.interceptors.response.use(
	(response) => response,
	(error) => {
		// 处理请求错误
		console.error('API 请求错误:', error)
		return Promise.reject(error)
	}
)

export default api
